import request from '@/utils/request'
import http from '@/utils/requestimg'
export function logins (data) {
  return request({
    url: '/api/qixing/user/login',
    method: 'post',
    data
  })
}

export function getInfo (token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout () {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
export function userInfo () {
  return request({
    url: '/api/qixing/user/userInfo',
    method: 'post'
  })
}

export function uploadavatar (data) {
  return request({
    url: '/api/qixing/user/uploadavatar',
    method: 'post',
    data
  })
}

export function profile (data) {
  return request({
    url: '/api/qixing/user/profile',
    method: 'post',
    data
  })
}
export function usehelp (data) {
  return request({
    url: '/api/qixing/user/usehelp',
    method: 'post',
    data
  })
}
export function usehelpDetail (data) {
  return request({
    url: '/api/qixing/user/usehelpDetail',
    method: 'post',
    data
  })
}
export function locationinfo (data) {
  return request({
    url: '/api/qixing/user/locationinfo',
    method: 'post',
    data
  })
}
export function modifypwd (data) {
  return request({
    url: '/api/qixing/user/modifypwd',
    method: 'post',
    data
  })
}
export function userMedal (data) {
  return request({
    url: '/api/qixing/user/medal',
    method: 'post',
    data
  })
}
export function logcancellation (data) {
  return request({
    url: '/api/qixing/user/logcancellation',
    method: 'post',
    data
  })
}
export function emsSend (data) {
  return request({
    url: '/api/ems/send',
    method: 'post',
    data
  })
}

export function bonus (data) {
  return request({
    url: '/api/qixing/user/bonus',
    method: 'post',
    data
  })
}
